/*
 * 博客文章
 */
import { getRequest, postRequest } from '/@/lib/axios';

export const blogApi = {  
   /**
   * @description:获取博客
   * @param {*}
   * @return {*}
   */
   get: (blogId) => {
    return getRequest(`/blog/admin/get?id=${blogId}`);
  },
  /**
   * @description:更新博客
   * @param {*}
   * @return {*}
   */
  save: (data) => {
    return postRequest('/blog/admin/save', data);
  },
  /**
   * @description: 删除博客
   * @param {number} blogId
   * @return {*}
   */
  delete: (blogId) => {
    return getRequest(`/blog/admin/delete?id=${blogId}`);
  },
  /**
   * @description: 数据分页查询
   * @param {number} 
   * @return {*}
   */
  searchPage: (data) => {
    return postRequest(`/blog/admin/searchPage`,data);
  },
};
